package com.im323.application;

import java.util.List;

import com.im323.dnspod.DnsPodErrorEnum;
import com.im323.dnspod.DnspodService;
import com.im323.dnspod.result.DnspodDomain;
import com.im323.dnspod.result.DnspodResult;

public class IMDDNSDomainController {

	public static List<DnspodDomain> getDomainList() {
		DnspodResult<List<DnspodDomain>> dnspodResult = DnspodService.getDomainList();
		if (dnspodResult.getStatus().getCode() != DnsPodErrorEnum.SUCCESS.getCode()) {
			System.out.println(dnspodResult.getStatus().getMessage());
			return null;
		}
		return dnspodResult.getInfo();
	}
}
